﻿using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using Golf.IDAL;
using Maticsoft.DBUtility;//Please add references
namespace Golf.DAL
{
	/// <summary>
	/// 数据访问类:Golf_Product
	/// </summary>
	public partial class Golf_Product:IGolf_Product
	{
		public Golf_Product()
		{}
		#region  Method

		/// <summary>
		/// 得到最大ID
		/// </summary>
		public int GetMaxId()
		{
		return DbHelperSQL.GetMaxID("Id", "Golf_Product"); 
		}

		/// <summary>
		/// 是否存在该记录
		/// </summary>
		public bool Exists(int Id)
		{
			int rowsAffected;
			SqlParameter[] parameters = {
					new SqlParameter("@Id", SqlDbType.Int,4)
			};
			parameters[0].Value = Id;

			int result= DbHelperSQL.RunProcedure("Golf_Product_Exists",parameters,out rowsAffected);
			if(result==1)
			{
				return true;
			}
			else
			{
				return false;
			}
		}

		/// <summary>
		///  增加一条数据
		/// </summary>
		public int Add(Golf.Model.Golf_Product model)
		{
			int rowsAffected;
			SqlParameter[] parameters = {
					new SqlParameter("@Id", SqlDbType.Int,4),
					new SqlParameter("@Pro_TypeId", SqlDbType.Int,4),
					new SqlParameter("@Pro_BrandTypeId", SqlDbType.Int,4),
					new SqlParameter("@Pro_Name", SqlDbType.NVarChar,200),
					new SqlParameter("@Pro_Number", SqlDbType.NVarChar,100),
					new SqlParameter("@Pro_BuyNum", SqlDbType.Int,4),
					new SqlParameter("@Pro_Picture", SqlDbType.NVarChar,200),
					new SqlParameter("@Pro_PicSmall", SqlDbType.NVarChar,200),
					new SqlParameter("@Pro_PicBig", SqlDbType.NVarChar,200),
					new SqlParameter("@Pro_SeoTitle", SqlDbType.NVarChar,200),
					new SqlParameter("@Pro_Wood", SqlDbType.NVarChar,100),
					new SqlParameter("@Pro_Save", SqlDbType.Int,4),
					new SqlParameter("@Pro_MarketPrice", SqlDbType.Decimal,9),
					new SqlParameter("@Pro_Price", SqlDbType.Decimal,9),
					new SqlParameter("@IsPromotion", SqlDbType.Bit,1),
					new SqlParameter("@Pro_PromotionPrice", SqlDbType.Decimal,9),
					new SqlParameter("@PromotionStartTime", SqlDbType.DateTime),
					new SqlParameter("@PromotionEndTime", SqlDbType.DateTime),
					new SqlParameter("@Pro_Usage", SqlDbType.NText),
					new SqlParameter("@Pro_Introduction", SqlDbType.NText),
					new SqlParameter("@IsShow", SqlDbType.Bit,1),
					new SqlParameter("@isCommend", SqlDbType.Bit,1),
					new SqlParameter("@Pro_AddTime", SqlDbType.DateTime),
					new SqlParameter("@LimitBuyNum", SqlDbType.Int,4),
					new SqlParameter("@InventoryNum", SqlDbType.Int,4),
					new SqlParameter("@IsStock", SqlDbType.Bit,1),
					new SqlParameter("@Pro_CommentNum", SqlDbType.Int,4),
					new SqlParameter("@AdminId", SqlDbType.Int,4),
					new SqlParameter("@IsGrounding", SqlDbType.Bit,1),
					new SqlParameter("@Pro_Star", SqlDbType.Int,4)};
			parameters[0].Direction = ParameterDirection.Output;
			parameters[1].Value = model.Pro_TypeId;
			parameters[2].Value = model.Pro_BrandTypeId;
			parameters[3].Value = model.Pro_Name;
			parameters[4].Value = model.Pro_Number;
			parameters[5].Value = model.Pro_BuyNum;
			parameters[6].Value = model.Pro_Picture;
			parameters[7].Value = model.Pro_PicSmall;
			parameters[8].Value = model.Pro_PicBig;
			parameters[9].Value = model.Pro_SeoTitle;
			parameters[10].Value = model.Pro_Wood;
			parameters[11].Value = model.Pro_Save;
			parameters[12].Value = model.Pro_MarketPrice;
			parameters[13].Value = model.Pro_Price;
			parameters[14].Value = model.IsPromotion;
			parameters[15].Value = model.Pro_PromotionPrice;
			parameters[16].Value = model.PromotionStartTime;
			parameters[17].Value = model.PromotionEndTime;
			parameters[18].Value = model.Pro_Usage;
			parameters[19].Value = model.Pro_Introduction;
			parameters[20].Value = model.IsShow;
			parameters[21].Value = model.isCommend;
			parameters[22].Value = model.Pro_AddTime;
			parameters[23].Value = model.LimitBuyNum;
			parameters[24].Value = model.InventoryNum;
			parameters[25].Value = model.IsStock;
			parameters[26].Value = model.Pro_CommentNum;
			parameters[27].Value = model.AdminId;
			parameters[28].Value = model.IsGrounding;
			parameters[29].Value = model.Pro_Star;

			DbHelperSQL.RunProcedure("Golf_Product_ADD",parameters,out rowsAffected);
			return (int)parameters[0].Value;
		}

		/// <summary>
		///  更新一条数据
		/// </summary>
		public bool Update(Golf.Model.Golf_Product model)
		{
			int rowsAffected=0;
			SqlParameter[] parameters = {
					new SqlParameter("@Id", SqlDbType.Int,4),
					new SqlParameter("@Pro_TypeId", SqlDbType.Int,4),
					new SqlParameter("@Pro_BrandTypeId", SqlDbType.Int,4),
					new SqlParameter("@Pro_Name", SqlDbType.NVarChar,200),
					new SqlParameter("@Pro_Number", SqlDbType.NVarChar,100),
					new SqlParameter("@Pro_BuyNum", SqlDbType.Int,4),
					new SqlParameter("@Pro_Picture", SqlDbType.NVarChar,200),
					new SqlParameter("@Pro_PicSmall", SqlDbType.NVarChar,200),
					new SqlParameter("@Pro_PicBig", SqlDbType.NVarChar,200),
					new SqlParameter("@Pro_SeoTitle", SqlDbType.NVarChar,200),
					new SqlParameter("@Pro_Wood", SqlDbType.NVarChar,100),
					new SqlParameter("@Pro_Save", SqlDbType.Int,4),
					new SqlParameter("@Pro_MarketPrice", SqlDbType.Decimal,9),
					new SqlParameter("@Pro_Price", SqlDbType.Decimal,9),
					new SqlParameter("@IsPromotion", SqlDbType.Bit,1),
					new SqlParameter("@Pro_PromotionPrice", SqlDbType.Decimal,9),
					new SqlParameter("@PromotionStartTime", SqlDbType.DateTime),
					new SqlParameter("@PromotionEndTime", SqlDbType.DateTime),
					new SqlParameter("@Pro_Usage", SqlDbType.NText),
					new SqlParameter("@Pro_Introduction", SqlDbType.NText),
					new SqlParameter("@IsShow", SqlDbType.Bit,1),
					new SqlParameter("@isCommend", SqlDbType.Bit,1),
					new SqlParameter("@Pro_AddTime", SqlDbType.DateTime),
					new SqlParameter("@LimitBuyNum", SqlDbType.Int,4),
					new SqlParameter("@InventoryNum", SqlDbType.Int,4),
					new SqlParameter("@IsStock", SqlDbType.Bit,1),
					new SqlParameter("@Pro_CommentNum", SqlDbType.Int,4),
					new SqlParameter("@AdminId", SqlDbType.Int,4),
					new SqlParameter("@IsGrounding", SqlDbType.Bit,1),
					new SqlParameter("@Pro_Star", SqlDbType.Int,4)};
			parameters[0].Value = model.Id;
			parameters[1].Value = model.Pro_TypeId;
			parameters[2].Value = model.Pro_BrandTypeId;
			parameters[3].Value = model.Pro_Name;
			parameters[4].Value = model.Pro_Number;
			parameters[5].Value = model.Pro_BuyNum;
			parameters[6].Value = model.Pro_Picture;
			parameters[7].Value = model.Pro_PicSmall;
			parameters[8].Value = model.Pro_PicBig;
			parameters[9].Value = model.Pro_SeoTitle;
			parameters[10].Value = model.Pro_Wood;
			parameters[11].Value = model.Pro_Save;
			parameters[12].Value = model.Pro_MarketPrice;
			parameters[13].Value = model.Pro_Price;
			parameters[14].Value = model.IsPromotion;
			parameters[15].Value = model.Pro_PromotionPrice;
			parameters[16].Value = model.PromotionStartTime;
			parameters[17].Value = model.PromotionEndTime;
			parameters[18].Value = model.Pro_Usage;
			parameters[19].Value = model.Pro_Introduction;
			parameters[20].Value = model.IsShow;
			parameters[21].Value = model.isCommend;
			parameters[22].Value = model.Pro_AddTime;
			parameters[23].Value = model.LimitBuyNum;
			parameters[24].Value = model.InventoryNum;
			parameters[25].Value = model.IsStock;
			parameters[26].Value = model.Pro_CommentNum;
			parameters[27].Value = model.AdminId;
			parameters[28].Value = model.IsGrounding;
			parameters[29].Value = model.Pro_Star;

			DbHelperSQL.RunProcedure("Golf_Product_Update",parameters,out rowsAffected);
			if (rowsAffected > 0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}

		/// <summary>
		/// 删除一条数据
		/// </summary>
		public bool Delete(int Id)
		{
			int rowsAffected=0;
			SqlParameter[] parameters = {
					new SqlParameter("@Id", SqlDbType.Int,4)
			};
			parameters[0].Value = Id;

			DbHelperSQL.RunProcedure("Golf_Product_Delete",parameters,out rowsAffected);
			if (rowsAffected > 0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		/// <summary>
		/// 批量删除数据
		/// </summary>
		public bool DeleteList(string Idlist )
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("delete from Golf_Product ");
			strSql.Append(" where Id in ("+Idlist + ")  ");
			int rows=DbHelperSQL.ExecuteSql(strSql.ToString());
			if (rows > 0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}

		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		public Golf.Model.Golf_Product GetModel(int Id)
		{
			SqlParameter[] parameters = {
					new SqlParameter("@Id", SqlDbType.Int,4)
			};
			parameters[0].Value = Id;

			Golf.Model.Golf_Product model=new Golf.Model.Golf_Product();
			DataSet ds= DbHelperSQL.RunProcedure("Golf_Product_GetModel",parameters,"ds");
			if(ds.Tables[0].Rows.Count>0)
			{
				if(ds.Tables[0].Rows[0]["Id"]!=null && ds.Tables[0].Rows[0]["Id"].ToString()!="")
				{
					model.Id=int.Parse(ds.Tables[0].Rows[0]["Id"].ToString());
				}
				if(ds.Tables[0].Rows[0]["Pro_TypeId"]!=null && ds.Tables[0].Rows[0]["Pro_TypeId"].ToString()!="")
				{
					model.Pro_TypeId=int.Parse(ds.Tables[0].Rows[0]["Pro_TypeId"].ToString());
				}
				if(ds.Tables[0].Rows[0]["Pro_BrandTypeId"]!=null && ds.Tables[0].Rows[0]["Pro_BrandTypeId"].ToString()!="")
				{
					model.Pro_BrandTypeId=int.Parse(ds.Tables[0].Rows[0]["Pro_BrandTypeId"].ToString());
				}
				if(ds.Tables[0].Rows[0]["Pro_Name"]!=null && ds.Tables[0].Rows[0]["Pro_Name"].ToString()!="")
				{
					model.Pro_Name=ds.Tables[0].Rows[0]["Pro_Name"].ToString();
				}
				if(ds.Tables[0].Rows[0]["Pro_Number"]!=null && ds.Tables[0].Rows[0]["Pro_Number"].ToString()!="")
				{
					model.Pro_Number=ds.Tables[0].Rows[0]["Pro_Number"].ToString();
				}
				if(ds.Tables[0].Rows[0]["Pro_BuyNum"]!=null && ds.Tables[0].Rows[0]["Pro_BuyNum"].ToString()!="")
				{
					model.Pro_BuyNum=int.Parse(ds.Tables[0].Rows[0]["Pro_BuyNum"].ToString());
				}
				if(ds.Tables[0].Rows[0]["Pro_Picture"]!=null && ds.Tables[0].Rows[0]["Pro_Picture"].ToString()!="")
				{
					model.Pro_Picture=ds.Tables[0].Rows[0]["Pro_Picture"].ToString();
				}
				if(ds.Tables[0].Rows[0]["Pro_PicSmall"]!=null && ds.Tables[0].Rows[0]["Pro_PicSmall"].ToString()!="")
				{
					model.Pro_PicSmall=ds.Tables[0].Rows[0]["Pro_PicSmall"].ToString();
				}
				if(ds.Tables[0].Rows[0]["Pro_PicBig"]!=null && ds.Tables[0].Rows[0]["Pro_PicBig"].ToString()!="")
				{
					model.Pro_PicBig=ds.Tables[0].Rows[0]["Pro_PicBig"].ToString();
				}
				if(ds.Tables[0].Rows[0]["Pro_SeoTitle"]!=null && ds.Tables[0].Rows[0]["Pro_SeoTitle"].ToString()!="")
				{
					model.Pro_SeoTitle=ds.Tables[0].Rows[0]["Pro_SeoTitle"].ToString();
				}
				if(ds.Tables[0].Rows[0]["Pro_Wood"]!=null && ds.Tables[0].Rows[0]["Pro_Wood"].ToString()!="")
				{
					model.Pro_Wood=ds.Tables[0].Rows[0]["Pro_Wood"].ToString();
				}
				if(ds.Tables[0].Rows[0]["Pro_Save"]!=null && ds.Tables[0].Rows[0]["Pro_Save"].ToString()!="")
				{
					model.Pro_Save=int.Parse(ds.Tables[0].Rows[0]["Pro_Save"].ToString());
				}
				if(ds.Tables[0].Rows[0]["Pro_MarketPrice"]!=null && ds.Tables[0].Rows[0]["Pro_MarketPrice"].ToString()!="")
				{
					model.Pro_MarketPrice=decimal.Parse(ds.Tables[0].Rows[0]["Pro_MarketPrice"].ToString());
				}
				if(ds.Tables[0].Rows[0]["Pro_Price"]!=null && ds.Tables[0].Rows[0]["Pro_Price"].ToString()!="")
				{
					model.Pro_Price=decimal.Parse(ds.Tables[0].Rows[0]["Pro_Price"].ToString());
				}
				if(ds.Tables[0].Rows[0]["IsPromotion"]!=null && ds.Tables[0].Rows[0]["IsPromotion"].ToString()!="")
				{
					if((ds.Tables[0].Rows[0]["IsPromotion"].ToString()=="1")||(ds.Tables[0].Rows[0]["IsPromotion"].ToString().ToLower()=="true"))
					{
						model.IsPromotion=true;
					}
					else
					{
						model.IsPromotion=false;
					}
				}
				if(ds.Tables[0].Rows[0]["Pro_PromotionPrice"]!=null && ds.Tables[0].Rows[0]["Pro_PromotionPrice"].ToString()!="")
				{
					model.Pro_PromotionPrice=decimal.Parse(ds.Tables[0].Rows[0]["Pro_PromotionPrice"].ToString());
				}
				if(ds.Tables[0].Rows[0]["PromotionStartTime"]!=null && ds.Tables[0].Rows[0]["PromotionStartTime"].ToString()!="")
				{
					model.PromotionStartTime=DateTime.Parse(ds.Tables[0].Rows[0]["PromotionStartTime"].ToString());
				}
				if(ds.Tables[0].Rows[0]["PromotionEndTime"]!=null && ds.Tables[0].Rows[0]["PromotionEndTime"].ToString()!="")
				{
					model.PromotionEndTime=DateTime.Parse(ds.Tables[0].Rows[0]["PromotionEndTime"].ToString());
				}
				if(ds.Tables[0].Rows[0]["Pro_Usage"]!=null && ds.Tables[0].Rows[0]["Pro_Usage"].ToString()!="")
				{
					model.Pro_Usage=ds.Tables[0].Rows[0]["Pro_Usage"].ToString();
				}
				if(ds.Tables[0].Rows[0]["Pro_Introduction"]!=null && ds.Tables[0].Rows[0]["Pro_Introduction"].ToString()!="")
				{
					model.Pro_Introduction=ds.Tables[0].Rows[0]["Pro_Introduction"].ToString();
				}
				if(ds.Tables[0].Rows[0]["IsShow"]!=null && ds.Tables[0].Rows[0]["IsShow"].ToString()!="")
				{
					if((ds.Tables[0].Rows[0]["IsShow"].ToString()=="1")||(ds.Tables[0].Rows[0]["IsShow"].ToString().ToLower()=="true"))
					{
						model.IsShow=true;
					}
					else
					{
						model.IsShow=false;
					}
				}
				if(ds.Tables[0].Rows[0]["isCommend"]!=null && ds.Tables[0].Rows[0]["isCommend"].ToString()!="")
				{
					if((ds.Tables[0].Rows[0]["isCommend"].ToString()=="1")||(ds.Tables[0].Rows[0]["isCommend"].ToString().ToLower()=="true"))
					{
						model.isCommend=true;
					}
					else
					{
						model.isCommend=false;
					}
				}
				if(ds.Tables[0].Rows[0]["Pro_AddTime"]!=null && ds.Tables[0].Rows[0]["Pro_AddTime"].ToString()!="")
				{
					model.Pro_AddTime=DateTime.Parse(ds.Tables[0].Rows[0]["Pro_AddTime"].ToString());
				}
				if(ds.Tables[0].Rows[0]["LimitBuyNum"]!=null && ds.Tables[0].Rows[0]["LimitBuyNum"].ToString()!="")
				{
					model.LimitBuyNum=int.Parse(ds.Tables[0].Rows[0]["LimitBuyNum"].ToString());
				}
				if(ds.Tables[0].Rows[0]["InventoryNum"]!=null && ds.Tables[0].Rows[0]["InventoryNum"].ToString()!="")
				{
					model.InventoryNum=int.Parse(ds.Tables[0].Rows[0]["InventoryNum"].ToString());
				}
				if(ds.Tables[0].Rows[0]["IsStock"]!=null && ds.Tables[0].Rows[0]["IsStock"].ToString()!="")
				{
					if((ds.Tables[0].Rows[0]["IsStock"].ToString()=="1")||(ds.Tables[0].Rows[0]["IsStock"].ToString().ToLower()=="true"))
					{
						model.IsStock=true;
					}
					else
					{
						model.IsStock=false;
					}
				}
				if(ds.Tables[0].Rows[0]["Pro_CommentNum"]!=null && ds.Tables[0].Rows[0]["Pro_CommentNum"].ToString()!="")
				{
					model.Pro_CommentNum=int.Parse(ds.Tables[0].Rows[0]["Pro_CommentNum"].ToString());
				}
				if(ds.Tables[0].Rows[0]["AdminId"]!=null && ds.Tables[0].Rows[0]["AdminId"].ToString()!="")
				{
					model.AdminId=int.Parse(ds.Tables[0].Rows[0]["AdminId"].ToString());
				}
				if(ds.Tables[0].Rows[0]["IsGrounding"]!=null && ds.Tables[0].Rows[0]["IsGrounding"].ToString()!="")
				{
					if((ds.Tables[0].Rows[0]["IsGrounding"].ToString()=="1")||(ds.Tables[0].Rows[0]["IsGrounding"].ToString().ToLower()=="true"))
					{
						model.IsGrounding=true;
					}
					else
					{
						model.IsGrounding=false;
					}
				}
				if(ds.Tables[0].Rows[0]["Pro_Star"]!=null && ds.Tables[0].Rows[0]["Pro_Star"].ToString()!="")
				{
					model.Pro_Star=int.Parse(ds.Tables[0].Rows[0]["Pro_Star"].ToString());
				}
				return model;
			}
			else
			{
				return null;
			}
		}

		/// <summary>
		/// 获得数据列表
		/// </summary>
		public DataSet GetList(string strWhere)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select Id,Pro_TypeId,Pro_BrandTypeId,Pro_Name,Pro_Number,Pro_BuyNum,Pro_Picture,Pro_PicSmall,Pro_PicBig,Pro_SeoTitle,Pro_Wood,Pro_Save,Pro_MarketPrice,Pro_Price,IsPromotion,Pro_PromotionPrice,PromotionStartTime,PromotionEndTime,Pro_Usage,Pro_Introduction,IsShow,isCommend,Pro_AddTime,LimitBuyNum,InventoryNum,IsStock,Pro_CommentNum,AdminId,IsGrounding,Pro_Star ");
			strSql.Append(" FROM Golf_Product ");
			if(strWhere.Trim()!="")
			{
				strSql.Append(" where "+strWhere);
			}
			return DbHelperSQL.Query(strSql.ToString());
		}

		/// <summary>
		/// 获得前几行数据
		/// </summary>
		public DataSet GetList(int Top,string strWhere,string filedOrder)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select ");
			if(Top>0)
			{
				strSql.Append(" top "+Top.ToString());
			}
			strSql.Append(" Id,Pro_TypeId,Pro_BrandTypeId,Pro_Name,Pro_Number,Pro_BuyNum,Pro_Picture,Pro_PicSmall,Pro_PicBig,Pro_SeoTitle,Pro_Wood,Pro_Save,Pro_MarketPrice,Pro_Price,IsPromotion,Pro_PromotionPrice,PromotionStartTime,PromotionEndTime,Pro_Usage,Pro_Introduction,IsShow,isCommend,Pro_AddTime,LimitBuyNum,InventoryNum,IsStock,Pro_CommentNum,AdminId,IsGrounding,Pro_Star ");
			strSql.Append(" FROM Golf_Product ");
			if(strWhere.Trim()!="")
			{
				strSql.Append(" where "+strWhere);
			}
			strSql.Append(" order by " + filedOrder);
			return DbHelperSQL.Query(strSql.ToString());
		}

		/// <summary>
		/// 获取记录总数
		/// </summary>
		public int GetRecordCount(string strWhere)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select count(1) FROM Golf_Product ");
			if(strWhere.Trim()!="")
			{
				strSql.Append(" where "+strWhere);
			}
			object obj = DbHelperSQL.GetSingle(strSql.ToString());
			if (obj == null)
			{
				return 0;
			}
			else
			{
				return Convert.ToInt32(obj);
			}
		}
		/// <summary>
		/// 分页获取数据列表
		/// </summary>
		public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("SELECT * FROM ( ");
			strSql.Append(" SELECT ROW_NUMBER() OVER (");
			if (!string.IsNullOrEmpty(orderby.Trim()))
			{
				strSql.Append("order by T." + orderby );
			}
			else
			{
				strSql.Append("order by T.Id desc");
			}
			strSql.Append(")AS Row, T.*  from Golf_Product T ");
			if (!string.IsNullOrEmpty(strWhere.Trim()))
			{
				strSql.Append(" WHERE " + strWhere);
			}
			strSql.Append(" ) TT");
			strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
			return DbHelperSQL.Query(strSql.ToString());
		}

		/// <summary>
		/// 分页获取数据列表
		/// </summary>
		public DataSet GetList(int PageSize,int PageIndex,string strWhere)
		{
			SqlParameter[] parameters = {
					new SqlParameter("@tblName", SqlDbType.VarChar, 255),
					new SqlParameter("@fldName", SqlDbType.VarChar, 255),
					new SqlParameter("@PageSize", SqlDbType.Int),
					new SqlParameter("@PageIndex", SqlDbType.Int),
					new SqlParameter("@IsReCount", SqlDbType.Bit),
					new SqlParameter("@OrderType", SqlDbType.Bit),
					new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
					};
			parameters[0].Value = "Golf_Product";
			parameters[1].Value = "Id";
			parameters[2].Value = PageSize;
			parameters[3].Value = PageIndex;
			parameters[4].Value = 1;
			parameters[5].Value = 0;
			parameters[6].Value = strWhere;	
			return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
		}

		#endregion  Method
	}
}

